package tbdp.tool.datasource;

/**
 * @author xbkaishui
 * @version $Id: DataSource.java, v 0.1 2017-06-17 下午3:08 xbkaishui Exp $$
 */
public class DataSourceConfig {

    private String jdbcUrl;

    private String userName;

    private String password;

    public String getJdbcUrl() {
        return jdbcUrl;
    }

    public void setJdbcUrl(String jdbcUrl) {
        this.jdbcUrl = jdbcUrl;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DataSourceConfig config = (DataSourceConfig) o;

        return jdbcUrl != null ? jdbcUrl.equals(config.jdbcUrl) : config.jdbcUrl == null;

    }

    @Override
    public int hashCode() {
        return jdbcUrl != null ? jdbcUrl.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "DataSourceConfig{" +
                "jdbcUrl='" + jdbcUrl + '\'' +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
